#!/bin/bash
# This script compress a directory ($1) with zstd to a location ($2).
# example: ./rename.sh 0 ch8

echo "Total arguments : $#"
FILE_PATH="/media/a/data/backup-vm/"
echo "default location for compressed directory = $FILE_PATH"
echo "directory_name = $1"
echo "directory_to_save = $2"

tar -cvf - $1/ | zstd  > ${2:-$FILE_PATH}$1-$(date +%Y-%m-%d).tzst
